<?php
$javascript->link(
			array('http://www.google.com/jsapi'),
			false
		);

		$javascript->codeBlock('var initJquery = function(){google.load("jquery", "1.2");	google.load("jqueryui", "1.5");} ; try {initJquery(); } catch (e){ setTimeout("1000" , initJquery ); }' , array('inline'=>false) );
		
		$javascript->link(
			array(
			'jquery-cycle.js',
			'jquery-easing.js',
			'historyTabs.js',
			'jquery-jMonthCalendar-plugin.js',
			'calendarProcessHistory.js'
			),false);

		$html->css(array(
			'/themes/default/css/jquery-ui/theme/ui.all.css',
			'core.css'
		)
			,
		'stylesheet', 'media=screen',
		false);
		
		$javascript->codeBlock('var initJquery = function(){google.load("jquery", "1.2");	google.load("jqueryui", "1.5");} ; try {initJquery(); } catch (e){ setTimeout("1000" , initJquery ); }' , array('inline'=>false) );


$javascript->codeBlock('
					   	$(\'document\').ready(function(){
		var options = {onMonthChanged: function(dateIn) { processHandHistory(); return true; } };
		var events = '. $eventsJsonString .';
		$.jMonthCalendar.Initialize(options, events);
		$.jMonthCalendar.ChangeMonth('.$lastEventDate.');
		
	});
					   ' , array('inline'=>false) );
?>

<?php echo $this->renderElement('monthStats',array(
							'monthHandsSeen'=>$monthHandsSeen,
			'monthVPP'=>$monthVPP,
			'monthPFR'=>$monthPFR,
			'afTotal'=>$afTotal,
			'afRaise'=>$afRaise,
			'afBet'=>$afBet,
			'afCall'=>$afCall,
			'wtsd'=>$wtsd,
			'wtsdw'=>$wtsdw	
							));?>

<div id="jMonthCalendar"></div>
<div style="clear: both">&nbsp;</div>
